<!DOCTYPE html>
<html lang="en" xmlns:th="https://thymeleaf.org">
<head>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <meta charset="UTF-8">
    <title>update</title>
</head>
<body>
<h1>修改</h1>
<form id="update_form" th:action="@{/update}" method="post">
    <input type="hidden" name="_method" value="put">
    id: <input type="text" name="id" th:value="${user.id}"><br>
    password: <input type="password" name="password" th:value="${user.password}"><br>
    name: <input type="text" name="name" th:value="${user.name}"><br>
    方向: <input type="checkbox" name="languages" value="Java" th:checked="#arrays.contains(user.languages,'Java')}"> Java
    <input type="checkbox" name="languages" value="C" th:checked="${#arrays.contains(user.languages,'C')}"> C
    <input type="checkbox" name="languages" value="C++" th:checked="${#arrays.contains(user.languages,'C++')}"> C++
    <input id="update" type="submit" value="修改">
</form><br>
</body>

</html>